#!/usr/bin/env zx


(async function () {
  $.shell = '/bin/zsh'

  let appNames = (await $`brew outdated --cask`).stdout.trim().split(/\s*\n\s*/).map(name => name.trim());

  // console.log(`brew upgrade --cask ${appNames.join(' ')}`);
  for (let i = 0; i < appNames.length; i++) {
    const name = appNames[i];
    await $`brew reinstall --cask ${name}`
  }
})();
